package com.mashuai.utils.ztest.toolkit.msCrud;

import com.alibaba.fastjson.JSON;
import com.mashuai.utils.toolkit.core.msCrudbean.annotation.MsCrudRewrite;
import com.mashuai.utils.toolkit.core.msMp.MsDb;
import com.mashuai.utils.ztest.pb.bean.MsUser;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: MsCrudBeanService
 * @Description:
 */
@Component
public class MsCrudBeanService {


    /**
     * 重写查询方法
     * **/
    @MsCrudRewrite(rewriteMethod = "selfFind")
    public Object findMethod(Map<String, Object> params) {
        System.err.println(JSON.toJSONString(params));
        List<MsUser> list = MsDb.list(MsUser.class);
        return list;
    }
}
